import request from '@/utils/request'

export const login = (data) => {
  return request.post('/user/login', data)
}
// 获取用户信息
export const getUser = () => {
  return request.get('/user')
}
// 获取收藏房屋列表
export const getFavorites = () => {
  return request.get('/user/favorites')
}
// 用户登出
export const logout = () => {
  return request.post('/user/logout')
}

// 获取发布房屋列表
export const getHouses = () => {
  return request.get('/user/houses')
}

export const postHouses = (data) => {
  return request.post('/user/houses', data)
}
